package com.yike.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yike.user.api.vo.ShopFeignVo;
import com.yike.user.entity.Shop;

import com.yike.user.param.AroundShopParam;
import com.yike.user.param.PlatformShopPageParam;
import com.yike.user.param.ShopPageParam;
import com.yike.user.param.SubAgentShopPageParam;
import com.yike.user.vo.PlatformShopVo;
import com.yike.user.vo.ShopTransactionDataVo;
import com.yike.user.vo.ShopVo;
import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * 店铺表 Mapper 接口
 *
 * @author Sakura
 * @since 2024-08-23
 */
@Mapper
public interface ShopMapper extends BaseMapper<Shop> {

    ShopVo getShopInfo(@Param("shopNo") String shopNo);

    ShopFeignVo getShopFeignVo(@Param("shopId") Long shopId);


     Map<String , Objects> getShopDetailsFeignVo(@Param("shopId") Long shopId);
    IPage<ShopVo> getUserShopList(@Param("page") Page page, @Param("userId") Long userId,
                                  @Param("param") ShopPageParam param);

    IPage<ShopVo> getAgentShopList(@Param("page") Page page, @Param("userId") Long userId,
                                   @Param("param") ShopPageParam param);

    IPage<ShopVo> getAgentCreateShopList(@Param("page") Page page, @Param("userId") Long userId,
                                         @Param("param") ShopPageParam param);

    IPage<ShopVo> getSubAgentShopList(@Param("page") Page page, @Param("userId") Long userId,
                                      @Param("param") SubAgentShopPageParam param);

    List<ShopVo> getAroundShopList(@Param("param") AroundShopParam param);

    List<ShopTransactionDataVo> getShopTransactionData(@Param("shopId") Long shopId, @Param("certainDate") String certainDate,
                                                       @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    PlatformShopVo getPlatformShopVo(@Param("id") Long id);

    IPage<PlatformShopVo> getPlatformShopList(@Param("page") Page page,
                                              @Param("param") PlatformShopPageParam param);

    Shop getMerchantNotBindShop(@Param("mobile") String mobile);


}
